﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace WCS.Infrastructure.EFCore;

/// <summary>
/// 登录日志表
/// </summary>
[Table("LoginLog")]
public partial class LoginLog
{
    /// <summary>
    /// 登录日志ID
    /// </summary>
    [Key]
    [StringLength(32)]
    public string Id { get; set; } = null!;

    /// <summary>
    /// 用户账户
    /// </summary>
    [StringLength(11)]
    public string? Account { get; set; }

    /// <summary>
    /// 用户Id
    /// </summary>
    [StringLength(32)]
    public string? UserId { get; set; }

    /// <summary>
    /// 登录时间
    /// </summary>
    [Column(TypeName = "timestamp(0) without time zone")]
    public DateTime? CreationTime { get; set; }

    /// <summary>
    /// 结果
    /// </summary>
    public int? Result { get; set; }

    /// <summary>
    /// 登录IP
    /// </summary>
    [Column("IP")]
    [StringLength(20)]
    public string? Ip { get; set; }

    /// <summary>
    /// 凭据
    /// </summary>
    [StringLength(32)]
    public string? Code { get; set; }

    /// <summary>
    /// 类型
    /// </summary>
    [StringLength(50)]
    public string? Type { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    [StringLength(255)]
    public string? Explain { get; set; }
}
